package com.yh.csx.bsf.flow.engine.state;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.yh.csx.bsf.flow.dao.model.auto.t_approve_log_model;
import lombok.val;

import java.util.Date;

/**
 * @author: chejiangyi
 * @version: 2019-10-28 18:38
 **/
public class StartNode extends BaseNode{
    @Override
    public String getName(){
        return "开始";
    }
    @Override
    public void flow(int flowid){
        try {
            logFlowDebug(flowid,"节点:开始 进入流转");
            val model = new t_approve_log_model(0,flowid,0,"","",getName(),"0",new Date(),"系统",new Date(),"系统","系统");
            addApproveLog(model);
            beginScript(flowid);
            route(flowid,0);
        }catch (Exception e){
            throw filterException(flowid,e);
        }
    }

    public void reFlow(){

    }
}
